<template>
  <div>
    <div style="height: 600px;overflow: auto" :id="divId">
      <div style="height: 2000px;position: relative">
        <div style="color: red">
          55555
        </div>
        <div style="position: absolute;bottom: 0;right: 0">
          5555555555
        </div>
      </div>
    </div>
    <el-button @click="print">打印</el-button>
  </div>
</template>

<script>
import {PrintUtils} from "@localModules/ZhiXinLib/utils/PrintUtils";
import {createUniqueString} from "@localModules/ZhiXinLib/utils";

export default {
  name: "index",
  data(){
    return{
      divId: createUniqueString()
    }
  },
  methods:{
    print(){
      PrintUtils.printById(this.divId)
    }
  }
}
</script>

<style scoped lang="scss">

</style>
